<template>
	<view class="page">
		<!-- <view class="flex benben-position-layout flex flex-wrap align-center wrongQuestion_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub wrongQuestion_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  wrongQuestion_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='wrongQuestion_fd0_0_c1'>订单详情</text>
				<view class='wrongQuestion_fd0_0_c2'>
				</view>
			</view>
		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view> -->

		<view class="loading_css" v-if="isShow">
			<u-loading size="36" color="#FC5B03"></u-loading>
			<view>加载中</view>
		</view>
		<template v-else>
			<view class="order_status">
				<view class="order_status_text flex align-center justify-between" v-if="detailsInfo.status == 1">
					<text>待支付</text>
					<view class="kefu_text" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/customer/customer`">
						<image :src='STATIC_URL+"287.png"'></image>
						<view class="kefu_text">客服</view>
					</view>
				</view>
				<view class="order_status_text flex align-center justify-between" v-if="detailsInfo.status == 2">
					<text>待取车</text>
					<view class="kefu_text" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/customer/customer`">
						<image :src='STATIC_URL+"287.png"'></image>
						<view class="kefu_text">客服</view>
					</view>
				</view>
				<view class="order_status_text flex align-center justify-between" v-if="detailsInfo.status == 3">
					<text>进行中</text>
					<view class="kefu_text" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/customer/customer`">
						<image :src='STATIC_URL+"287.png"'></image>
						<view class="kefu_text">客服</view>
					</view>
				</view>
				<view class="order_status_text flex align-center justify-between" v-if="detailsInfo.status == 4">
					<text>已完成</text>
					<view class="kefu_text" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/customer/customer`">
						<image :src='STATIC_URL+"287.png"'></image>
						<view class="kefu_text">客服</view>
					</view>
				</view>
				<view class="order_status_text flex align-center justify-between" v-if="detailsInfo.status == 5">
					<text>已取消</text>
					<view class="kefu_text" @tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/customer/customer`">
						<image :src='STATIC_URL+"287.png"'></image>
						<view class="kefu_text">客服</view>
					</view>
				</view>
				<view class="order_paytime flex align-center" v-if="detailsInfo.status == 1">
					<text class="paytime_1">剩余支付时间</text>
					<u-count-down class="paytime_2" color="#FC5B03" separator-color="#FC5B03" :show-days="false"
						:show-hours="false" separator="zh" :timestamp="detailsInfo.sysj" bg-color="transparent"
						@end="timeEnd"></u-count-down>
				</view>
			</view>

			<view class="car_info" :class="detailsInfo.status == 1 ? 'marginTop1' : 'marginTop2'">
				<view class="vehicle_information">
					<view class="car_content">
						<view class="car_name">
							<view class="car_name_1">{{detailsInfo.name}}</view>
							<view class="car_name_2">
								<text>{{detailsInfo.seats}}座</text>
								<text class="car_name_2_1">丨</text>
								<text>{{detailsInfo.gearbox}}</text>
								<text class="car_name_2_1">丨</text>
								<!-- <text>{{detailsInfo.category_name}}</text>
								<text class="car_name_2_1">丨</text> -->
								<text>{{detailsInfo.model}}</text>
							</view>
						</view>
						<view class="car_img">
							<u-lazy-load height="120" border-radius="16" class="car_img" :image="detailsInfo.image"
								:loading-img="loadingImg" :error-img="errorImg"></u-lazy-load>
							<image v-if="detailsInfo.type == 2" class="car_icon" :src='STATIC_URL+"220.png"'
								mode="aspectFill"></image>
						</view>
					</view>
					<view class="license_plate">
						<view class="label_le">
							<template v-if="detailsInfo.tags">
								<template v-for="(v, k) in (detailsInfo.tags).split(',')">
									<image v-if="v == 1" class="label_1" :src='STATIC_URL+"219.png"' mode="aspectFill">
									</image>
									<view class="label_2" v-if="v != 1">{{getTag(v)}}</view>
								</template>
							</template>

						</view>
						<view class="plate_le">
							<image class="plate_le_1" :src='STATIC_URL+"269.png"'></image>
							<view class="plate_le_2">丨</view>
							<view class="plate_le_3">{{detailsInfo.car_number | plateNumbers}}</view>
						</view>
					</view>
				</view>
				<view class="car_date">
					<view class="date_content">
						<view class="date_item">
							<view class="date_item_1">{{timeData.toDay_month}}</view>
							<view class="date_item_2">
								<text v-if="timeData.is_today == 1">今天</text>
								<text v-else>{{timeData.week}}</text>
								<text>{{timeData.toDay_time}}</text>
							</view>
						</view>
						<view class="date_days">
							<view class="days_line"></view>
							<view class="days_num">共{{timeData.dayNum}}天</view>
							<view class="days_line"></view>
						</view>
						<view class="date_item">
							<view class="date_item_1">{{timeData.twoDay_month}}</view>
							<view class="date_item_2">
								<text>{{timeData.twoWeek}}</text>
								<text>{{timeData.twoDay_time}}</text>
							</view>
						</view>
					</view>
					<view class="quotation_information">
						<view class="information">
							<view class="information_2">
								<image :src='STATIC_URL+"225.png"'></image>
								<view class="information_2_1">取还车</view>
								<view class="information_2_2">
									<view class="information_2_2_1" v-if="detailsInfo.door_to_door == 1">到店取送车</view>
									<view class="information_2_2_1" v-else>店员上门送取车</view>
								</view>
							</view>
						</view>
						<view class="quotation_address">
							<image :src='STATIC_URL+"224.png"' mode="aspectFill"></image>
						</view>
					</view>
				</view>
			</view>
			<template v-if="(detailsInfo.vio_status === 0 || detailsInfo.vio_status == 1 || detailsInfo.vio_status == 2) && is_violation == 1">
				<view class="violation_info">
					<view class="tip_title flex align-center justify-between">
						<view class="">违章信息</view>
						<view class="vio_status_text">
							<text v-if="detailsInfo.vio_status === 0">违章待处理</text>
							<text v-if="detailsInfo.vio_status == 1">违章处理中</text>
							<text v-if="detailsInfo.vio_status == 2">处理完成</text>
						</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">违章时间：</view>
						<view class="violation_item_ri">{{detailsInfo.vio_time}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">违章原因：</view>
						<view class="violation_item_ri">{{detailsInfo.vio_reason}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">违章扣分：</view>
						<view class="violation_item_ri violation_sign">{{detailsInfo.vio_points}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">罚款金额：</view>
						<view class="violation_item_ri violation_sign">￥{{Number(detailsInfo.vio_fee)}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">违章处理服务费：</view>
						<view class="violation_item_ri violation_sign">￥{{Number(detailsInfo.vio_service_fee)}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">违章截止日期：</view>
						<view class="violation_item_ri">{{detailsInfo.deadline_time}}</view>
					</view>
					<view class="violation_item flex align-center">
						<view class="violation_item_le">备注：</view>
						<view class="violation_item_ri">{{detailsInfo.vio_other ? detailsInfo.vio_other : '无'}}</view>
					</view>
					<view class="violation_item flex" style="margin-top: 0;">
						<view class="violation_item_le" style="margin-top: 24rpx;">违章图片：</view>
						<view class="violation_item_img">
							<view class="violation_img" v-for="(v, k) in violation_img" :key="k" @tap.stop="previewImg(1, k)">
								<image :src="v" mode="aspectFill"></image>
							</view>
						</view>
					</view>
				</view>
				<view style="height: 28rpx;"></view>
			</template>

			<template v-else>
				<view class="store_info">
					<view class="tip_title">门店信息</view>
					<view class="store_content flex align-center justify-between">
						<view class="store_le flex align-center">
							<image :src='STATIC_URL+"237.png"'></image>
							<view class="store_le_text">{{detailsInfo.store_name}}</view>
						</view>
						<view class="store_ri">
							<view class="ri_item"
								@tap.stop="openLocation(detailsInfo.store_lat, detailsInfo.store_lng, detailsInfo.store_name, detailsInfo.store_address)">
								<image :src='STATIC_URL+"276.png"'></image>
								<view>导航</view>
							</view>
							<view class="ri_line"></view>
							<view class="ri_item" @tap.stop="getPhone(detailsInfo.store_phone)">
								<image :src='STATIC_URL+"277.png"'></image>
								<view>电话</view>
							</view>
						</view>
					</view>
				</view>
				<view class="preferential">
					<view class="tip_title flex align-center justify-between" @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/personalInformation/personalInformation`">
						<view>承租人信息</view>
						<view class="tip_title_ri flex align-center">
							<template v-if="detailsInfo.is_auth != 1">
								<image class="tip_title_ri_1" :src='STATIC_URL+"270.png"' mode="aspectFill"></image>
								<text class="tip_title_ri_2">未认证</text>
							</template>

							<template v-if="detailsInfo.is_auth == 1">
								<image class="tip_title_ri_1" :src='STATIC_URL+"271.png"' mode="aspectFill"></image>
								<text class="tip_title_ri_2">已认证</text>
							</template>

							<image class="tip_title_ri_3" :src='STATIC_URL+"208.png"' mode="aspectFill"></image>
						</view>
					</view>
					<view class="coupon">
						<view class="coupon_le">
							姓名
						</view>
						<view class="coupon_ri">
							{{detailsInfo.username}}
						</view>
					</view>
					<view class="coupon" style="margin-top: 8rpx;">
						<view class="coupon_le">
							手机号
						</view>
						<view class="coupon_ri">
							{{detailsInfo.phone_no}}
						</view>
					</view>
				</view>
				<view class="deposit">
					<view class="tip_title">
						<text>押金支付方式</text>

						<!-- #ifndef MP-ALIPAY -->
						<text>：</text>
						<text class="tip_title_text">芝麻信用≥550分 押金双免</text>
						<!-- #endif -->

					</view>
					<!-- #ifdef MP-ALIPAY -->
					<template v-if="detailsInfo.is_freeze > 0">
						<view class="deposit_text">
							<view class="flex align-center deposit_view">
								<view class="flex align-center justify-center label_3">
									<image :src='STATIC_URL+"10.png"'></image>
									<text>芝麻信用 | 免押金</text>
									<text></text>
								</view>
								<view class="label_4" v-if="detailsInfo.is_freeze == 1">
									已免押金￥{{Number(detailsInfo.deposit)}}
								</view>
							</view>
						</view>
					</template>
					<template v-else>
						<view class="deposit_text">
							<image :src='STATIC_URL+"272.png"'></image>
							<view class="explain">
								<view class="explain_text">
									<view class="explain_text_1">到店免押</view>
									<view class="explain_text_2">在线支付租金，取车时到店扫码免押或通过其他方式</view>
								</view>
							</view>
						</view>
					</template>

					<!-- #endif -->
					<!-- #ifndef MP-ALIPAY -->
					<view class="deposit_text">
						<!-- <image :src='STATIC_URL+"235.png"'></image> -->
						<image :src='STATIC_URL+"272.png"'></image>
						<view class="explain">
							<view class="explain_text">
								<view class="explain_text_1">到店免押</view>
								<view class="explain_text_2">在线支付租金，取车时到店扫码免押或通过其他方式</view>
							</view>
						</view>
					</view>
					<!-- #endif -->
				</view>
				<view class="order_detail">
					<view class="tip_title">订单费用项</view>
					<template v-if="other_order_pay_item.length > 0">
						<view class="order_item" v-for="(v, k) in other_order_pay_item" :key="k">
							<view class="order_item_le" style="flex: 8.5;">{{v.name}}</view>
							<view class="order_item_ri" style="flex: 1.5;text-align: right;">
								<span>￥{{Number(v.price)}}</span>
							</view>
						</view>
					</template>
					<view class="order_item">
						<view class="order_item_le">订单总价</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.money)}}</span>
						</view>
					</view>
					<view class="order_item">
						<view class="order_item_le" v-if="detailsInfo.status == 1 || detailsInfo.status == 5">应支付</view>
						<view class="order_item_le" v-else>已支付</view>
						<view class="order_item_ri">
							<template v-if="detailsInfo.status == 1 || detailsInfo.status == 5">
								<span>￥{{Number(detailsInfo.money)}}</span>
							</template>
							<template v-else>
								<span
									v-if="detailsInfo.all_items_has_pay == 0">￥{{roundNum(detailsInfo.money-detailsInfo.unpay_money, 2)}}</span>
								<span v-else>￥{{Number(detailsInfo.money)}}</span>
							</template>
						</view>
					</view>
					<view class="order_item" v-if="detailsInfo.all_items_has_pay == 0">
						<view class="order_item_le">待支付</view>
						<view class="order_item_ri">
							<span style="color: #FC5B03;">￥{{Number(detailsInfo.unpay_money)}}</span>
							<!-- <span style="color: #FC5B03;">￥{{Number(totalPrice)}}</span> -->
						</view>
					</view>
					<!-- <view class="order_line"></view>
					<view class="order_price">
						<span class="order_price_1">订单总价：</span>
						<span class="order_price_2">￥{{detailsInfo.origin_money}}</span>
					</view> -->
				</view>
				<view class="order_detail" v-if="detailsInfo.f_order_id != 0">
					<view class="tip_title">续租信息</view>
					<template v-for="(item, index) in relet">
						<view class="order_item">
							<view class="order_item_le">续租开始时间</view>
							<view class="order_item_ri">
								<span>{{item.take_at}}</span>
							</view>
						</view>
						<view class="order_item">
							<view class="order_item_le">续租结束时间</view>
							<view class="order_item_ri">
								<span>{{item.repay_at}}</span>
							</view>
						</view>
					</template>

				</view>
				<view class="order_change"
					v-if="detailsInfo.status == 1 || detailsInfo.status == 2 || detailsInfo.status == 3">
					<view class="tip_title">订单变更</view>
					<view style="overflow: hidden;">
						<view class="change_item flex align-center justify-center" v-if="detailsInfo.status == 1"
							@tap.stop="openCancel">取消订单</view>
						<view class="change_item flex align-center justify-center"
							v-if="detailsInfo.status == 2 && detailsInfo.money > 0" @tap.stop="refundOrder">退款</view>
						<view class="change_item flex align-center justify-center"
							v-if="detailsInfo.status == 2 && detailsInfo.money <= 0" @tap.stop="openCancel">取消订单</view>
						<!-- <template v-if="detailsInfo.status == 2 || detailsInfo.status == 3 || detailsInfo.status == 4">
							<view class="change_item flex align-center justify-center" v-if="detailsInfo.contract == 0"
								@tap.stop="signContract">签署合同</view>
							<view class="change_item flex align-center justify-center" v-if="detailsInfo.contract == 1"
								@tap.stop="signContract">合同待签署
							</view>
							<view class="change_item flex align-center justify-center" v-if="detailsInfo.contract == 2"
								@tap.stop="seeContract">查看合同</view>
						</template> -->

						<view class="change_item flex align-center justify-center" @tap.stop="handleJumpDiy"
							data-type="navigateTo" :data-url="`/pages/my/myOrder/depositRecord?order_id=${order_id}`">
							免押记录
						</view>

						<!-- #ifndef MP-TOUTIAO -->
						<view class="change_item flex align-center justify-center" v-if="detailsInfo.status == 3"
							@tap.stop="goRenewal">续租</view>
						<!-- #endif -->
					</view>
				</view>
				<view class="record_info flex align-center justify-between" v-if="detailsInfo.status > 1">
					<view class="record_item flex align-center"
						v-if="detailsInfo.status == 2 || detailsInfo.status == 3 || detailsInfo.status == 4 || detailsInfo.status == 5"
						@tap.stop="handleJumpDiy" data-type="navigateTo"
						:data-url="`/pages/my/myOrder/payRecords?order_id=${order_id}`">
						<image :src='STATIC_URL+"273.png"'></image>
						<text>支付记录</text>
					</view>
					<!-- <view class="record_line"></view> -->
					<!-- <view class="record_item flex align-center" @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/myOrder/changeRecords?order_id=${order_id}`">
						<image :src='STATIC_URL+"274.png"'></image>
						<text>换车记录</text>
					</view> -->
					<template v-if="detailsInfo.status == 2 || detailsInfo.status == 3">
						<view class="record_line"></view>
						<view class="record_item flex align-center" @tap.stop="handleJumpDiy" data-type="navigateTo"
							:data-url="`/pages/my/myOrder/inspectionRecords?order_id=${order_id}`">
							<image :src='STATIC_URL+"275.png"'></image>
							<text>验车记录</text>
						</view>
					</template>
				</view>
				<view class="notice">
					<view class="tip_title">预定须知</view>
					<view class="notice_item" @tap.stop="openNotice(0)">
						<view class="notice_item_le">取消规则</view>
						<image :src='STATIC_URL+"208.png"'></image>
					</view>
					<view class="notice_item" @tap.stop="openNotice(1)">
						<view class="notice_item_le">押金政策</view>
						<image :src='STATIC_URL+"208.png"'></image>
					</view>
					<view class="notice_item" @tap.stop="openNotice(2)">
						<view class="notice_item_le">取车证件</view>
						<image :src='STATIC_URL+"208.png"'></image>
					</view>
					<view class="notice_item" @tap.stop="openNotice(3)">
						<view class="notice_item_le">里程限制</view>
						<image :src='STATIC_URL+"208.png"'></image>
					</view>
				</view>
				
				<view class="customer_view">
					<view class="customer_top" @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/denglu/agreement/agreement?aid=14`">
						<text>点击立即支付表示您已阅读并同意</text>
						<text class="customer_term">《预订服务协议》</text>
					</view>
					<view class="customer_botm" @tap.stop="previewImg(2)">
						<text>预订服务提供方：</text>
						<text>{{detailsInfo.customer_name}} ></text>
					</view>
				</view>
				
				<template v-if="detailsInfo.status == 1 || detailsInfo.status == 2 || detailsInfo.status == 3">
					<view class="money_footer" v-if="detailsInfo.all_items_has_pay == 0">
						<template v-if="detailsInfo.status == 1">
							<view class="footer_le">
								<view class="footer_le_1">
									<text>￥</text>
									<text class="footer_le_1_1">{{Number(detailsInfo.money)}}</text>
									<!-- <text class="footer_le_1_1">{{Number(totalPrice)}}</text> -->
				
								</view>
								<view class="footer_le_2">
									押金￥{{Number(detailsInfo.deposit)}}
								</view>
							</view>
							<view class="footer_ri">
								<!-- <view class="footer_ri_1" @tap.stop="detailShow=true">明细</view> -->
								<view class="footer_ri_2" @tap.stop="postGenerateOrder">立即支付</view>
								<!-- #ifdef MP-ALIPAY -->
								<!-- <view class="footer_ri_2" @tap.stop="initXinyong" v-if="detailsInfo.is_freeze == 0 || detailsInfo.is_freeze == 2">订单免押</view> -->
								<view class="footer_ri_2" @tap.stop="xinyongRefund" v-if="detailsInfo.is_freeze == 1">押金退回
								</view>
								<!-- #endif -->
							</view>
						</template>
						<template v-else>
							<view class="footer_le">
								<view class="footer_le_1">
									<text>￥</text>
									<text class="footer_le_1_1">{{Number(detailsInfo.unpay_money)}}</text>
									<!-- <text class="footer_le_1_1">{{Number(totalPrice)}}</text> -->
								</view>
							</view>
							<view class="footer_ri">
								<view class="footer_ri_2" @tap.stop="postGenerateOrder">支付</view>
				
								<!-- #ifdef MP-ALIPAY -->
								<!-- <view class="footer_ri_2" @tap.stop="initXinyong" v-if="detailsInfo.is_freeze == 0 || detailsInfo.is_freeze == 2">订单免押</view> -->
								<view class="footer_ri_2" @tap.stop="xinyongRefund" v-if="detailsInfo.is_freeze == 1">押金退回
								</view>
								<!-- #endif -->
				
							</view>
						</template>
					</view>
					<view class="money_footer" v-else>
						<template v-if="detailsInfo.status == 1">
							<view class="footer_le">
								<view class="footer_le_1">
									<text>￥</text>
									<text class="footer_le_1_1">{{Number(detailsInfo.money)}}</text>
									<!-- <text class="footer_le_1_1">{{Number(totalPrice)}}</text> -->
								</view>
								<view class="footer_le_2">
									押金￥{{Number(detailsInfo.deposit)}}
								</view>
							</view>
							<view class="footer_ri">
								<!-- <view class="footer_ri_1" @tap.stop="detailShow=true">明细</view> -->
								<view class="footer_ri_2" @tap.stop="postGenerateOrder">立即支付</view>
								<!-- #ifdef MP-ALIPAY -->
								<!-- <view class="footer_ri_2" @tap.stop="initXinyong" v-if="detailsInfo.is_freeze == 0 || detailsInfo.is_freeze == 2">订单免押</view> -->
								<view class="footer_ri_2" @tap.stop="xinyongRefund" v-if="detailsInfo.is_freeze == 1">押金退回
								</view>
								<!-- #endif -->
							</view>
						</template>
						<template v-else>
							<view class="footer_le"></view>
							<view class="footer_ri">
								<!-- #ifdef MP-ALIPAY -->
								<!-- <view class="footer_ri_2" @tap.stop="initXinyong" v-if="detailsInfo.is_freeze == 0 || detailsInfo.is_freeze == 2">订单免押</view> -->
								<view class="footer_ri_2" @tap.stop="xinyongRefund" v-if="detailsInfo.is_freeze == 1">押金退回
								</view>
								<!-- #endif -->
							</view>
						</template>
					</view>
				</template>
				<view class="money_footer" v-if="detailsInfo.status == 4 || detailsInfo.status == 5">
					<view class="footer_le">
					</view>
					<view class="footer_ri">
						<view class="footer_ri_2" @click="chooseCar">再次预定</view>
					</view>
				</view>
				<view style="height: 150rpx;"></view>
			</template>


			<!-- <template v-if="detailsInfo.status == 1">
				<view class="coupon_info" @tap.stop="openCoupon">
					<view class="tip_title">优惠活动</view>
					<view class="coupon_item">
						<view class="coupon_le">
							红包/优惠券
						</view>
						<view class="coupon_ri">
							<image v-if="!coupon_name" class="coupon_ri_1" :src='STATIC_URL+"234.png"'></image>
							<view class="" v-else>{{coupon_name}}</view>
							<image :src='STATIC_URL+"208.png"'></image>
						</view>
					</view>
				</view>
			</template> -->
			<!-- #ifdef MP-WEIXIN -->
			<view style="position: fixed;bottom: 120rpx;left: 0;z-index: 999;width: 100%;" v-if="detailsInfo.status == 1">
				<weixin-customer :source="5" @close="customerClose"></weixin-customer>
			</view>
			<view v-if="customerStatus && detailsInfo.status == 1" style="height: 100rpx;"></view>
			<!-- #endif -->

		</template>
		
		<u-popup v-model="buyShow" mode="bottom" border-radius="32">
			<view class="popup_price">
				<view class="popup_title">
					<view class=""></view>
					<u-icon @click="buyShow=false" name="close" color="#999"></u-icon>
				</view>
				<view class="popup_money">
					<text class="money_1">￥</text>
					<text class="money_2">325</text>
				</view>
				<view class="pay_list">
					<view class="pay_item" v-for="(item, index) in payType" :key="index" @tap.stop="selectPay(item.id)">
						<view class="pay_item_le">
							<image :src='item.icon' mode=""></image>
							<text>{{item.name}}</text>
						</view>
						<image v-if="pay_id == item.id" class="pay_item_ri" :src='STATIC_URL+"7.png"' mode=""></image>
						<image v-else class="pay_item_ri" :src='STATIC_URL+"8.png"' mode=""></image>
					</view>
				</view>
				<view class="pay_btn flex align-center justify-center">立即支付</view>
			</view>
		</u-popup>

		<u-popup v-model="noticeShow" mode="bottom" border-radius="32">
			<view class="notice_info">
				<view class="title_text">预定须知</view>
				<view class="notice_title">
					<uv-tabs :scrollable="false" :list="list2" @click="click2" :current="swiperIndex"
						:itemStyle="itemStyle" :activeStyle="activeStyle" lineColor="#FC5B03"></uv-tabs>
				</view>
				<view class="notice_text">
					<swiper class="notice_swiper" :indicator-dots="false" :autoplay="false" :current="swiperIndex"
						:circular="false" @change="swiperIndex = $event.detail.current">
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.cancel_rule"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.deposit"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.pick_car"></u-parse>
							</view>
						</swiper-item>
						<swiper-item>
							<view class="swiper-item">
								<u-parse :html="noticeInfo.mileage"></u-parse>
							</view>
						</swiper-item>
					</swiper>
				</view>
			</view>
		</u-popup>

		<u-popup v-model="detailShow" mode="bottom" border-radius="32">
			<view class="notice_info">
				<view class="title_text">订单明细</view>
				<view class="order_detail">
					<view class="order_item">
						<view class="order_item_le">订单租金</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.rent_money)}}</span>
						</view>
					</view>
					<view class="order_item">
						<view class="order_item_le">
							基本保障服务费{{Number(detailsInfo.insurance_money) / timeData.dayNum}}*{{timeData.dayNum}}</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.insurance_money)}}</span>
						</view>
					</view>
					<view class="order_item" v-if="detailsInfo.insure_plus_id != 0">
						<view class="order_item_le">{{upgrade_name}}</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.insure_plus_money)}}</span>
						</view>
					</view>
					<view class="order_item" v-if="detailsInfo.door_to_door == 2">
						<view class="order_item_le">送车上门</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.call_out_charge)}}</span>
						</view>
					</view>

					<view class="order_item">
						<view class="order_item_le">新人优惠</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.xryhq_price)}}</span>
						</view>
					</view>
					<view class="order_item">
						<view class="order_item_le">券抵扣</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.deduction)}}</span>
						</view>
					</view>
					<view class="order_item" v-if="detailsInfo.time_out_hours">
						<view class="order_item_le">超时{{detailsInfo.time_out_hours}}小时</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.time_out_price)}}</span>
						</view>
					</view>
					<view class="order_item" v-if="detailsInfo.km_out_num">
						<view class="order_item_le">行驶里程{{detailsInfo.km_out_num}}km</view>
						<view class="order_item_ri">
							<span>￥{{Number(detailsInfo.km_out_price)}}</span>
						</view>
					</view>
				</view>
			</view>
		</u-popup>

		<u-modal v-model="cancelShow" content="确认取消该订单吗？" :show-cancel-button="true" confirm-color="#FC5B03"
			@confirm="confirmCancel"></u-modal>

		<u-modal v-model="depositRefundShow" content="确认退回押金吗？" :show-cancel-button="true" confirm-color="#FC5B03"
			@confirm="depositRefund"></u-modal>
		<!-- <u-modal v-model="refundShow" content="退款只返还70%订单金额,确定要继续退款吗？" :show-cancel-button="true"
			confirm-color="#FC5B03" @confirm="confirmCancel"></u-modal> -->

		<!-- <benben-picker ref="benbenWritePickerCodepicker4" :visible.sync="pickerDiy1656985489961" :label.sync='dayLable'
			:value.sync='dayId' :options='dayList' mode='selector' :mask-show='true' :timeout='true' :picker-height='88'
			default-type='value' :default-props='{"label":"name","value":"value"}' @change="dayChange">
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between myInfo_picker4_0'>
					<text class='myInfo_picker4_0_c0' @tap="$refs.benbenWritePickerCodepicker4.cancel()">取消</text>
					<text class='myInfo_picker4_0_c1'>选择续租天数</text>
					<text class='myInfo_picker4_0_c2'
						@tap="$refs.benbenWritePickerCodepicker4.pickerConfirm()">确定</text>
				</view>
			</template>
		</benben-picker> -->


		<u-popup v-model="refundShow" border-radius="24" :mask="true" :mask-close-able="true" mode='bottom'>
			<view class="refund_pop">
				<view class="refund_title">订单退款</view>
				<view class="refund_view">订单已支付</view>
				<view class="refund_money" v-if="!detailsInfo.all_items_has_pay">
					￥{{Number(detailsInfo.money)-Number(detailsInfo.unpay_money)}}</view>
				<view class="refund_money" v-else>￥{{Number(detailsInfo.money)}}</view>
				<view class="refund_custom">
					<text>本次退款违约金为：</text>
					<!-- #ifdef MP-TOUTIAO -->
					<text class="refund_custom_price">￥0,</text>
					<!-- #endif -->
					<!-- #ifndef MP-TOUTIAO -->
					<text class="refund_custom_price" v-if="Number(detailsInfo.money) > 0">￥{{damages}},</text>
					<text class="refund_custom_price" v-else>￥0,</text>
					<!-- #endif -->
					<text>是否继续退款</text>
				</view>
				<view class="refund_tips">
					<text>提示：</text>
					<text>退款结果有时间延迟，请注意查看退款结果</text>
				</view>
				<view class="refund_btn flex align-center justify-between">
					<view class="refund_btn_1 flex align-center justify-center" @tap.stop="refundShow=false">我再看看</view>
					<!-- #ifdef MP-TOUTIAO -->
					<template v-if="isOpen == 1">
						<pay-button v-show="Number(detailsInfo.money) != 0"
							class="refund_btn_2 flex align-center justify-center" :mode="1" :order-id="orderId"
							:order-status="refundStatus" :refund="handleRefund" :error="refundError"
							:applyrefund="applyRefund" />
						<view v-show="Number(detailsInfo.money) == 0" class="refund_btn_2 flex align-center justify-center"
							@tap.stop="confirmRefund">确认
						</view>
					</template>

					<template v-else>
						<view v-if="Number(detailsInfo.money) == 0" class="refund_btn_2 flex align-center justify-center"
							@tap.stop="confirmRefund">确认
						</view>
						<view v-else class="refund_btn_2 flex align-center justify-center"
							@tap.stop="confirmDyRefund">确认
						</view>
					</template>
					
					<!-- <zijie-pay-button class="refund_btn_2 flex align-center justify-center" :orderId="orderId">确认</zijie-pay-button> -->
					<!-- #endif -->

					<!-- #ifdef MP-WEIXIN || MP-ALIPAY -->
					<view class="refund_btn_2 flex align-center justify-center" @tap.stop="confirmRefund">确认</view>
					<!-- #endif -->

				</view>
			</view>
		</u-popup>



		<u-mask :show="codeShow">
			<view class="warp">
				<view class="rect">
					<view class="free_code">
						<view class="code_view">
							<view class="qrcode_img">
								<image :src='codeUrl' mode="aspectFill"></image>
								<!-- <uv-qrcode ref="qrcode" size="352rpx" :value="codeUrl"></uv-qrcode> -->
							</view>
						</view>
						<!-- <view class="operation_btn flex align-center justify-between">
							<view class="operation_1">分享用户</view>
							<view class="operation_2">下载该码</view>
						</view> -->
						<view class="code_btn flex align-center justify-center" @tap.stop="clearCode">关闭</view>
					</view>
				</view>
			</view>
		</u-mask>


		<u-popup v-model="couponShow" mode="bottom" border-radius="32">
			<view class="popup_title">
				<view></view>
				<view class="">优惠券</view>
				<u-icon @click="couponShow=false" name="close" color="#999"></u-icon>
			</view>
			<view class="list">
				<scroll-view :scroll-y="true" class="coupon_scroll">
					<view class="list_item" v-for="(item, index) in couponList" :key="index"
						@tap.stop="selectCoupon(item.id, item.name, item.oprice, item.cars)">
						<view class="list_item_le">
							<view class="list_item_le_price">
								<view class="le_price">
									<text class="le_price_1">￥</text>
									<text class="le_price_2">{{Number(item.oprice)}}</text>
								</view>
								<view class="le_tip">可减免</view>
							</view>
						</view>
						<view class="list_item_ri">
							<view class="ri_content">
								<view class="ri_content_1 flex align-center justify-between">
									<view style="flex: 1;">{{item.name}}</view>
									<view style="font-weight: 400;font-size: 30rpx;width: 70rpx;text-align: right;">
										x{{item.left_num}}</view>
								</view>
								<view class="ri_content_2">截止：{{item.end_at}}</view>
								<view class="ri_content_3">指定门店和车型使用</view>
							</view>
							<view class="ri_btn flex align-center justify-center">去使用</view>
						</view>
					</view>
				</scroll-view>
			</view>
		</u-popup>
		
		
	</view>
</template>

<script>
	import utils from "@/common/utils/utils.js"
	import weixinCustomer from "@/components/customer/index.vue"
	export default {
		data() {
			return {
				"pickerDiy1656985489961": false,
				"loadingImg": "",
				"errorImg": "",
				"imageUrl": "https://n.sinaimg.cn/spider20240423/618/w1267h951/20240423/00f3-b0424ba924fbe8bb330e2dabf0f7b880.jpg",
				"dayList": [{
					"name": "1天",
					"value": "1",
					"image": ""
				}, {
					"name": "2天",
					"value": "2",
					"image": ""
				}],
				"birthday": "",
				"dayId": "1",
				"dayLable": "",
				scrollTop: 0, // 页面滚动距离
				buyShow: false,
				payType: [{
						name: '微信支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/264.png',
						id: 1
					},
					{
						name: '支付宝支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/265.png',
						id: 2
					},
					{
						name: '抖音支付',
						icon: 'https://speed.zhongchuxing.com/dyimages/263.png',
						id: 3
					}
				],
				pay_id: 1,
				order_id: "", // 订单id
				isShow: true,
				detailsInfo: {},
				noticeShow: false,
				detailShow: false,
				list2: [{
						name: '取消规则',
						id: ''
					},
					{
						name: '押金政策',
						id: ''
					}, {
						name: '取车证件',
						id: ''
					},
					{
						name: '里程限制',
						id: ''
					},
				],
				swiperIndex: 0,
				itemStyle: {
					'height': '78rpx',
					'fontSize': '26rpx',
					'color': '#666666'
				},
				activeStyle: {
					'color': '#111111',
					'fontWeight': 'bold'
				},
				upgrade_name: "", // 升级保障服务名称
				is_submit: false,
				provider: "",
				cancelShow: false,
				refundShow: false,
				timeData: {},
				days: 0,
				refund_price: 0, // 客户退款金额
				damages: 0, // 违约金
				tags: uni.getStorageSync('tag'),

				relet: [], // 续租信息
				other_order_pay_item: [],
				other_price_show: false,
				is_contract: false,
				refundStatus: 1,
				orderId: "",
				refundNo: "",
				pollIntervalId: null,
				refund_percentage: 70, // 退款比例
				is_pay_button: 1,

				pre_order_no: "", // 预支付数据接口生成的订单号
				need_pay: 0, // 需要支付的金额

				codeShow: false,
				codeUrl: "",
				depositRefundShow: false,

				couponShow: false,
				coupon_name: "",
				couponList: [],
				is_exist: 0, // 优惠券是否存在该车型
				totalPrice: 0,
				
				is_violation: 0, // 1违章订单
				violation_img: [],  // 违章图片
				customerStatus: false,
				noticeInfo: {},  // 预定须知内容
				isOpen: 1,  // 是否正在审核， 1是0否
			}
		},
		components: {
			weixinCustomer
		},
		filters: {
			plateNumbers(value) {
				return value.slice(0, 1) + '******';
			}
		},
		onReady() {

		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		created() {
			this.$scope.applyRefund = this.applyRefund;
			this.$scope.handleRefund = this.handleRefund;
			this.$scope.refundError = this.refundError;
		},
		onLoad(options) {
			let {
				order_id,
				is_violation
			} = options;
			if (order_id !== undefined) this.order_id = order_id;
			if (is_violation !== undefined) this.is_violation = is_violation;

			let _this = this;
			uni.getProvider({
				service: 'payment',
				success: res => {
					// console.log(res);
					_this.provider = res.provider[0];
				},
				fail: err => {
					console.log(err);
				}
			})

			// #ifdef MP-TOUTIAO
			if (tt.canIUse("industrySDK.pay-button")) {
				console.log('支持pay-button组件')
				this.is_pay_button = 1;
			} else {
				console.log('不支持pay-button组件')
				this.is_pay_button = 0;
			}
			// #endif
			// "zijie-pay-button": "/ttcomponents/DyPayButton/index"
			this.getNotice();
		},
		onShow() {
			this.isShow = true;
			this.getDetails();
			// #ifdef MP-WEIXIN
			let customerStatus = this.$store.state.customerStatus[4].status;
			this.customerStatus = customerStatus;
			// #endif
		},
		onHide() {
			this.refundShow = false;
		},
		onUnload() {
			this.stopPolling();
		},
		onPullDownRefresh() {
			this.getDetails();
		},
		methods: {
			// 获取预定须知 getBookingNotice
			getNotice() {
				this.$api.get(global.apiUrls.getBookingNotice, {
					
				}).then(res => {
					if (res.data.code == 1) {
						this.noticeInfo = res.data.data;
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			isExamine() {
				this.$api.post(global.apiUrls.isDyExamine, {
					
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.isOpen = res.data.data.is_open_audit;
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 订单详情
			getDetails() {
				this.$api.post(global.apiUrls.postOrderDetails, {
					order_id: this.order_id
				}).then(res => {
					// console.log(res);
					this.isShow = false;
					uni.stopPullDownRefresh();
					if (res.data.code == 1) {
						this.detailsInfo = res.data.data;
						this.other_order_pay_item = this.detailsInfo.other_order_pay_item;
						if (this.detailsInfo.f_order_id != 0) {
							this.relet = res.data.data.relet;
						}
						this.violation_img = res.data.data.violation_img;
						let toDay = this.detailsInfo.take_at;
						let week = utils.getWeekday(toDay);
						let twoDay = this.detailsInfo.repay_at;
						let twoWeek = utils.getWeekday(twoDay);
						this.timeData = {
							dayNum: this.detailsInfo.lease_day,
							is_today: this.detailsInfo.take_at == utils.getNowTime() ? 1 : 0,
							toDay: toDay,
							toDay_month: (toDay.substring(5, 10)).replace('-', '月') + '日',
							toDay_time: toDay.substring(11, 16),
							week: week,
							twoDay: twoDay,
							twoDay_month: (twoDay.substring(5, 10)).replace('-', '月') + '日',
							twoDay_time: twoDay.substring(11, 16),
							twoWeek: twoWeek
						}
						// console.log(this.timeData);
						this.orderId = this.detailsInfo.payment_order_no;
						this.getCarInsure();
						this.getRefundConfig();
						
						// #ifdef MP-TOUTIAO
						this.isExamine();
						// #endif
						
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 团购券列表  userCouponList
			getCouponList() {
				this.$api.post(global.apiUrls.userCouponList, {
					user_id: this.detailsInfo.user_id
				}).then(res => {
					// console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.couponList = res.data.data;
						if (this.couponList.length > 0) {
							let couponIndex = -1;
							let carIndex = -1;
							for (let i = 0; i < this.couponList.length; i++) {
								let arr = [];
								arr = this.couponList[i].cars.split(',');
								carIndex = arr.indexOf(this.detailsInfo.car_id.toString());
								if (carIndex != -1) {
									couponIndex = i;
									break;
								}
							}
							if (couponIndex != -1) {
								this.selectCoupon(this.couponList[couponIndex].id, this.couponList[couponIndex]
									.name, this.couponList[couponIndex].oprice, this.couponList[couponIndex]
									.cars);
							} else {
								let couponList = this.couponList;
								couponList = couponList.sort((a, b) => b.oprice - a.oprice);
								this.selectCoupon(couponList[0].id, couponList[0].name, couponList[0].oprice,
									couponList[0].cars);
							}
						}
					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 选择优惠券
			openCoupon() {
				if (this.couponList.length == 0) {
					this.$message.info('暂无可用优惠券');
					return;
				}
				this.couponShow = true;
			},
			selectCoupon(id, name, price, cars) {
				this.coupon_id = id;
				this.coupon_name = name;
				this.coupon_price = price;
				let carsArr = cars.split(',');
				let index = carsArr.indexOf(this.detailsInfo.car_id.toString());
				if (index != -1) {
					this.totalPrice = Number(this.detailsInfo.unpay_money) - Number(this.detailsInfo.price) - Number(this
						.detailsInfo.insurance_money);
					this.is_exist = 1;
				} else {
					this.totalPrice = Number(this.detailsInfo.unpay_money) - Number(this.coupon_price);
					this.is_exist = 0;
				}
				if (this.totalPrice < 0) {
					this.totalPrice = 0;
				}
				this.couponShow = false;
			},
			getTag(id) {
				let item = this.tags.find((item) => item.id == id);
				return item.name;
			},
			// 获取退款比例  postConfig
			getRefundConfig() {
				this.$api.get(global.apiUrls.postConfig, {

				}).then(res => {
					if (res.data.code == 1) {
						this.refund_percentage = res.data.data.refund_percentage;
						let fractionDigits = 2; // 保留2位小数
						let value1 = 0;
						if (!this.detailsInfo.all_items_has_pay) {
							value1 = (Number(this.detailsInfo.money) - Number(this.detailsInfo.unpay_money)) * (
								Number(res.data.data
									.refund_percentage) / 100);
						} else {
							value1 = Number(this.detailsInfo.money) * (Number(res.data.data
								.refund_percentage) / 100);
						}

						// this.refund_price = this.formatNumber(value1);
						let result1 = +`${value1}e${fractionDigits}`; // 145.78
						result1 <<= 0; // 145
						this.refund_price = +`${result1}e${-fractionDigits}`; // 1.45
						let value2 = 0;
						if (!this.detailsInfo.all_items_has_pay) {
							value2 = (Number(this.detailsInfo.money) - Number(this.detailsInfo.unpay_money)) * ((
								100 - Number(res.data.data
									.refund_percentage)) / 100);
						} else {
							value2 = Number(this.detailsInfo.money) * ((100 - Number(res.data.data
								.refund_percentage)) / 100);
						}

						let result2 = +`${value2}e${fractionDigits}`; // 145.78
						result2 <<= 0; // 145
						this.damages = +`${result2}e${-fractionDigits}`; // 1.45
						// this.damages = Number(this.detailsInfo.origin_money) - this.refund_price;
						// console.log(this.refund_price, this.damages);

					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			// 车辆保障数据列表  postCarInsure
			getCarInsure() {
				this.$api.post(global.apiUrls.postCarInsure, {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.insureList = res.data.data;
						if (res.data.data.length > 0) {
							res.data.data.forEach((v, k) => {
								if (v.id == this.detailsInfo.insure_plus_id) {
									this.upgrade_name = v.name;
								}
							})
						}
						// this.getCouponList();

					} else {
						this.$message.info(res.data.info);
					}
				})
			},
			//  待付款情况跳转区分
			goPayOrder() {
				if (this.detailsInfo.coupon_id) {
					this.postGenerateOrder();
				} else {
					uni.navigateTo({
						url: '/pages/index/reserveOrder/confirmOrder?door_to_door=' + (this.detailsInfo
								.door_to_door == 1 ? 0 : 1) + '&order_id=' + this.order_id + '&insure_plus_id=' +
							this.detailsInfo.insure_plus_id
					})
				}
			},
			// 立即预定支付
			postGenerateOrder() {
				if (this.is_submit) return;
				this.is_submit = true;
				let _this = this;
				uni.showLoading({
					title: '支付中'
				})
				_this.$api.post(global.apiUrls.orderCoupons, {
					real_commit: 1,
					order_id: _this.order_id
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						if (res.data.data.need_pay == 0) {
							uni.hideLoading();
							_this.$message.info('支付成功');
							_this.is_submit = false;
							_this.isShow = true;
							_this.getDetails();
						} else {
							// #ifdef MP-TOUTIAO

							_this.creatPrepayment();
							return;

							// tt.continueToPay({
							// 	outOrderNo: _this.detailsInfo.payment_order_no, // 外部订单号 2个订单号必填一个
							// 	success: (res) => {
							// 		const {
							// 			orderId,
							// 			outOrderNo
							// 		} = res;
							// 		console.log("success res", res);
							// 		console.log("orderId", orderId, "outOrderNo", outOrderNo);
							// 		_this.is_submit = false;
							// 		_this.isShow = true;
							// 		_this.getDetails();
							// 	},
							// 	fail: (res) => {
							// 		const {
							// 			orderId,
							// 			outOrderNo,
							// 			errNo,
							// 			errMsg,
							// 			errLogId
							// 		} = res;
							// 		if (errLogId) {
							// 			console.log("查询订单信息失败", errNo, errMsg, errLogId);
							// 		}
							// 		if (orderId || outOrderNo) {
							// 			console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
							// 		}
							// 		_this.$message.info(errMsg);
							// 		_this.is_submit = false;
							// 	},
							// });
							// #endif

							// #ifdef MP-WEIXIN
							uni.login({
								success: res => {
									_this.$api.post(global.apiUrls.postgetOpenid, {
										code: res.code,
										type: 2
									}).then(res => {
										if (res.data.code == 1) {
											// _this.openid = res.data.data.openid;
											_this.$api.post(global.apiUrls.postweixinPay, {
												order_id: _this.order_id,
												pay_type: 3,
												openid: res.data.data.openid,
												is_hello: 0,  // 0中出行  1哈啰
											}).then(result => {
												// console.log(result);
												uni.hideLoading();
												if (result.data.code == 1) {
													uni.requestPayment({
														provider: 'wxpay',
														// #ifdef MP-WEIXIN
														timeStamp: result.data
															.data.timeStamp,
														nonceStr: result.data
															.data.nonceStr,
														package: result.data
															.data.package,
														signType: result.data
															.data.signType,
														paySign: result.data
															.data.paySign,
														// #endif
														// #ifdef APP-PLUS
														orderInfo: data,
														// #endif
														success: (e) => {
															console.log(
																'success',
																e)
															_this.$message
																.info(
																	'支付成功'
																);
															_this
																.is_submit =
																false;
															_this.isShow =
																true;
															_this
																.getDetails();
														},
														fail: (e) => {
															console.log(e);
															// #ifdef APP-PLUS
															let failMsg =
																'requestPayment:fail canceled';
															// #endif
															// #ifndef APP-PLUS
															let failMsg =
																'requestPayment:fail cancel';
															// #endif
															if (e.errMsg ==
																failMsg) {
																_this
																	.$message
																	.info(
																		'支付已取消'
																	);
															} else {
																_this
																	.$message
																	.info(
																		'支付失败,请稍后重试'
																	);
															}
															_this
																.is_submit =
																false;
														},
														complete: () => {

														}
													});
												} else {
													_this.is_submit = false;
													_this.$message.info(result.data
														.info);
												}
											})
										} else {
											uni.hideLoading();
											_this.$message.info(res.data.info);
										}
									})
								},
								fail: err => {
									uni.hideLoading();
									_this.$message.info('获取code失败，请重试');
									_this.is_submit = false;
									console.log(err);
								}
							})
							// #endif


							// #ifdef MP-ALIPAY
							uni.login({
								success: res => {
									_this.$api.post(global.apiUrls.postgetOpenid, {
										code: res.code,
										type: 3
									}).then(res => {
										if (res.data.code == 1) {
											// _this.openid = res.data.data.openid;
											_this.$api.post(global.apiUrls.postAlipayPay, {
												order_id: _this.order_id,
												openid: res.data.data.openid
											}).then(result => {
												// console.log(result);
												uni.hideLoading();
												if (result.data.code == 1) {
													uni.requestPayment({
														provider: 'alipay',
														orderInfo: result.data
															.data.trade_no,
														success: (e) => {
															console.log(
																'success',
																e)
															if (e
																.resultCode ==
																9000) {
																_this
																	.$message
																	.info(
																		'支付成功'
																	);
																_this
																	.is_submit =
																	false;
																_this
																	.isShow =
																	true;
																_this
																	.getDetails();
															} else if (e
																.resultCode ==
																6001 ||
																e
																.resultCode ==
																6002) {
																_this
																	.is_submit =
																	false;
																_this
																	.$message
																	.info(
																		'支付已取消'
																	);
															} else {
																_this
																	.is_submit =
																	false;
																_this
																	.$message
																	.info(
																		'支付失败，请重试'
																	);
															}

														},
														fail: (e) => {
															console.log(e);
															// #ifdef APP-PLUS
															let failMsg =
																'requestPayment:fail canceled';
															// #endif
															// #ifndef APP-PLUS
															let failMsg =
																'requestPayment:fail cancel';
															// #endif
															if (e.errMsg ==
																failMsg) {
																_this
																	.$message
																	.info(
																		'支付已取消'
																	);
															} else {
																_this
																	.$message
																	.info(
																		'支付失败,请稍后重试'
																	);
															}
															_this
																.is_submit =
																false;
														},
														complete: () => {

														}
													});
												} else {
													_this.is_submit = false;
													_this.$message.info(result.data
														.info);
												}
											})
										} else {
											uni.hideLoading();
											_this.$message.info(res.data.info);
										}
									})
								},
								fail: err => {
									uni.hideLoading();
									_this.$message.info('获取code失败，请重试');
									_this.is_submit = false;
									console.log(err);
								}
							})
							// #endif
						}

					} else {
						uni.hideLoading();
						this.$message.info(res.data.info);
						this.is_submit = false;
					}
				}).catch(err => {
					this.is_submit = false;
					uni.hideLoading();
				})


			},

			// 生成抖音预支付数据  postPrepayment
			creatPrepayment() {
				this.$api.post(global.apiUrls.postPrepayment, {
					order_id: this.order_id
				}).then(res => {
					// console.log(res);
					uni.hideLoading();
					// return;
					if (res.data.code == 1) {
						this.pre_order_no = res.data.data.order_no;
						this.need_pay = res.data.data.need_pay;
						let _this = this;

						let params = {
							order_id: _this.order_id.toString()
						}
						let skulist = [{
							quantity: 1, // 购买数量 必填
							price: Number(_this.need_pay) * 100, // 商品价格 必填
							discountAmount: 0,
							skuId: String(res.data.data.product_id),
							// goodsId: '7399923302912788543', // 商品ID 必填
							skuType: 2, // 商品类型 必填
							goodsInfo: {
								goodsName: _this.detailsInfo.name, // 商品名称 必填
								goodsPhoto: _this.detailsInfo.image, // 商品图片链接 必填
								goodsId: String(res.data.data.product_id), // 商品ID 必填
								goodsType: 1
							}
						}]
						let totalAmount = _this.need_pay * 100
						console.log(totalAmount);
						// console.log(global.apiUrls.callbackUrl);
						tt.createOrder({
							skuList: skulist,
							payment: {
								totalAmount: totalAmount, // 订单总价 必填
							},
							callbackData: {
								order_no: _this.pre_order_no
							},
							callbackUrl: global.apiUrls.callbackUrl,
							success: (res) => {
								const {
									orderId,
									outOrderNo
								} = res;
								console.log("success res", res);
								console.log("orderId", orderId, "outOrderNo", outOrderNo);
								_this.is_submit = false;
								_this.getDetails();
							},
							fail: (res) => {
								console.log(res);
								const {
									orderId,
									outOrderNo,
									errNo,
									errMsg,
									errLogId
								} = res;
								if (errLogId) {
									console.log("预下单失败", errNo, errMsg, errLogId);
								}
								if (orderId || outOrderNo) {
									console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
								}
								console.log(errNo, errMsg);
								if (errNo == 4) {
									_this.$message.info('支付已取消');
									_this.is_submit = false;
									_this.getDetails();
								} else {
									_this.is_submit = false;
									_this.$message.info('支付失败,请稍后重试');
								}
							},
							complete(err) {
								console.log(err);
							}
						});
					} else {
						uni.hideLoading();
						this.is_submit = false;
						this.$message.info(res.data.info);
					}
				}).catch(err => {
					this.is_submit = false;
					uni.hideLoading();
				})
			},
			// 待支付倒计时结束
			timeEnd() {
				this.isShow = true;
				this.getDetails();
			},
			// 打开地图
			openLocation(lat, lng, store_name, store_address) {
				uni.openLocation({
					latitude: lat,
					longitude: lng,
					name: store_name,
					address: store_address,
					success: function() {
						console.log('success');
					},
					fail: function() {

					}
				});
			},
			// 拨打电话
			getPhone(phone) {
				if (!phone) {
					this.$message.info('未获取到门店联系方式，请联系客服');
					return;
				}
				uni.makePhoneCall({
					phoneNumber: phone //仅为示例
				});
			},

			// 取消订单  cancelOrder
			openCancel() {
				this.cancelShow = true;
			},
			confirmCancel() {
				this.cancelShow = false;
				uni.showLoading({
					title: '取消中'
				})
				this.$api.post(global.apiUrls.cancelOrder, {
					order_id: this.order_id
				}).then(res => {
					uni.hideLoading();
					this.$message.info(res.data.info);
					if (res.data.code == 1) {
						this.isShow = true;
						this.getDetails();
						uni.$emit('creatdOrder');
					}
				}).catch(err => {
					uni.hideLoading();
				})
			},

			// 退款
			refundOrder() {
				if (this.is_pay_button == 1) {
					this.refundShow = true;
				} else {
					this.$message.info('请联系客服退款');
				}

			},
			confirmRefund() {
				this.refundShow = false;
				uni.showLoading({
					title: '取消中'
				})
				this.$api.post(global.apiUrls.cancelOrder, {
					order_id: this.order_id
				}).then(res => {
					uni.hideLoading();
					this.$message.info(res.data.info);
					if (res.data.code == 1) {
						this.isShow = true;
						this.getDetails();
						uni.$emit('creatdOrder');
					}
				}).catch(err => {
					uni.hideLoading();
				})
			},
			confirmDyRefund() {
				this.refundShow = false;
				uni.showLoading({
					title: '取消中'
				})
				this.$api.post(global.apiUrls.dyUnauditedRefund, {
					payment_order_no : this.orderId
				}).then(res => {
					uni.hideLoading();
					this.$message.info(res.data.info);
					if (res.data.code == 1) {
						this.isShow = true;
						this.getDetails();
						uni.$emit('creatdOrder');
					}
				}).catch(err => {
					uni.hideLoading();
				})
			},

			handleRefund(event) {
				console.log(event, '111111111111');
				const {
					status,
					result
				} = event.detail;
				if (status === 'success') {
					this.isShow = true;
					this.startPolling();
				}
			},
			refundError(event) {
				console.log(event, '2222222222222');
				this.$message.info(event.detail.errMsg);
			},
			applyRefund(event) {
				console.log(event, '333333333333');
				const {
					orderId
				} = event.detail;
				// const itemOrderList = [{
				// 	itemOrderId: 'ots74032542074925898654163',
				// 	refundAmount: 1899
				// }]
				let itemOrderList = [];
				this.detailsInfo.dy_payments.forEach((v, k) => {
					itemOrderList.push({
						itemOrderId: v.payment_trade,
						// refundAmount: 1899,
						refundAmount: this.formatNumber(v.order_amount * (Number(this.refund_percentage) /
							100)) * 100
					})
				})
				const extra = {
					orderId
					// itemOrderList
				};
				return new Promise(resolve => {
					resolve(extra); // extra 透传至服务端时，当中的 itemOrderList 会被删除
					console.log(extra);
				});
			},

			formatNumber(num) {
				let strNum = String(num);
				let decimalIndex = strNum.indexOf('.');

				if (decimalIndex !== -1) {
					let decimalPart = strNum.slice(decimalIndex + 1, decimalIndex + 3);
					return strNum.slice(0, decimalIndex + 1) + decimalPart;
				} else {
					return strNum;
				}
			},
			startPolling() {
				this.pollIntervalId = setInterval(this.checkRefund, 1000);
				setTimeout(() => {
					this.stopPolling();
				}, 10000); // 10秒后停止轮询
			},
			stopPolling() {
				if (this.pollIntervalId) {
					clearInterval(this.pollIntervalId);
					this.pollIntervalId = null;
				}
			},
			checkRefund() {
				this.$api.get(global.apiUrls.checkOrderRefund, {
					order_id: this.order_id
				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						if (res.data.data.status == 5) {
							this.getDetails();
							this.stopPolling();
							uni.$emit('creatdOrder');
						}
					} else {
						this.$message.info(res.data.info);
					}
				})
			},


			// 续租
			// dayChange(e) {
			// 	this.pickerDiy1656985489961 = false;
			// 	uni.navigateTo({
			// 		url: '/pages/my/myOrder/renewaLease?order_id=' + this.order_id + '&days=' + e.value
			// 	})
			// },
			goRenewal() {
				let nextTime = this.checkTimeAndGetNextHour(this.detailsInfo.real_fc_time);
				global.nextTime = nextTime;
				uni.navigateTo({
					url: '/pages/my/myOrder/renewalTime?order_id=' + this.order_id + '&timeData=' + JSON.stringify(
						this.timeData)
				})
			},
			// 签署合同
			signContract() {
				if (this.is_contract) return;
				if (this.detailsInfo.contract == 0) {
					this.is_contract = true;
					this.$api.post(global.apiUrls.initContract, {
						order_id: this.order_id,
						user_id: this.detailsInfo.user_id
					}).then(res => {
						// console.log(res);
						this.is_contract = false;
						this.$message.info(res.data.info);
						if (res.data.code == 1) {
							this.isShow = true;
							this.getDetails();
						}
					}).catch(err => {
						this.is_contract = false;
					})
				} else if (this.detailsInfo.contract == 1) {
					this.is_contract = true;
					this.$api.post(global.apiUrls.viewContract, {
						cid: this.detailsInfo.contract_id
					}).then(result => {
						// console.log(result);
						this.is_contract = false;
						this.$message.info(result.data.info);
						if (result.data.code == 1) {
							this.isShow = true;
							this.getDetails();
						}
					}).catch(err => {
						this.is_contract = false;
					})
				}
			},
			seeContract() {
				uni.showLoading({
					title: '加载中'
				})
				let _this = this;
				uni.downloadFile({
					url: _this.detailsInfo.contract_url,
					success: function(res) {
						uni.hideLoading();
						var filePath = res.tempFilePath;
						uni.openDocument({
							filePath: filePath,
							showMenu: true,
							success: function(res) {
								console.log('打开文档成功');
							}
						});
					},
					fail: function(err) {
						uni.hideLoading();
						_this.$message.info('加载失败');
					}
				});
			},
			// 获取实际发车时间段并格式化为整点
			checkTimeAndGetNextHour(timeString) {
				// 创建Date对象
				var date = new Date(timeString);

				// 验证Date对象是否有效
				if (isNaN(date.getTime())) {
					console.error('Invalid date string');
					return null;
				}

				// 晚上九点的时间（21:00:00）
				var ninePM = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 21, 0, 0);

				// 判断是否大于晚上九点
				if (date > ninePM) {
					// 如果大于九点，返回21:00
					return '21:00';
				} else {
					// 否则，检查时分是否为整点
					if (date.getMinutes() === 0 && date.getSeconds() === 0) {
						// 如果是整点，直接返回当前时分
						var hours = date.getHours().toString().padStart(2, '0');
						return `${hours}:00`;
					} else {
						// 如果不是整点，设置分钟和秒为0，并检查小时是否需要进位
						date.setMinutes(0);
						date.setSeconds(0);
						date.setMilliseconds(0);

						// 如果当前小时和修改后的时间相同（即分钟和秒为0后还是当前小时），则小时数加1
						if (date.getHours() != date.getUTCHours()) {
							date.setHours(date.getHours() + 1);
						}

						// 返回下一个整点的时间
						var nextHourHours = date.getHours().toString().padStart(2, '0');
						return `${nextHourHours}:00`;
					}
				}
			},
			// 再次预定
			chooseCar() {
				uni.redirectTo({
					url: '/pages/index/modelsList/modelsList'
				})
			},
			click2(item) {
				this.swiperIndex = item.index;
			},
			openNotice(index) {
				this.swiperIndex = index;
				this.noticeShow = true;
			},
			selectPay(id) {
				this.pay_id = id;
			},


			roundNum(num, precision) {
				var multiplier = Math.pow(10, precision || 0);
				return Math.round(num * multiplier) / multiplier;
			},


			// 信用免押
			initXinyong() {
				let _this = this;
				_this.$api.post(global.apiUrls.depositRequired, {
					order_id: _this.order_id,
				}).then(res => {
					// console.log(res);
					// this.$message.info(res.data.info);
					if (res.data.code == 1) {
						let codeInfo = res.data.data.data;
						// let codeInfo = `alipays://platformapi/startapp?appId=2021004104689050&nbupdate=syncforce&page=%2Fpages%2Fopen%2Findex%3ForderStr%3D%22${res.data.data.data}%22`;
						// my.generateImageFromCode ({
						//   code: codeInfo,
						//   format: 'QRCODE',
						//   width: 176,
						//   correctLevel: 'H',
						//   codeColor: '#000000',
						//   backgroundColor: '#ffffff',
						//   success: function (res) {
						//     console.log (res);
						// 	_this.codeUrl = res.image;
						// 	_this.codeShow = true;
						//   },
						//   fail: function (err) {
						//     console.log (err);
						//   },
						// });
						// return;

						my.tradePay({
							"orderStr": res.data.data.data
								.orderStr, // 完整的支付参数拼接成的字符串，从 alipay.fund.auth.order.app.freeze 接口获取
							success: (res) => {
								if (res.resultCode == 9000) {
									uni.showLoading({
										title: '检测支付状态中'
									})
									setTimeout(() => {
										uni.hideLoading();
										_this.$message.info('支付押金成功');
										_this.getDetails();
									}, 2500)
								} else {
									_this.$message.info('支付押金失败,请到店支付');
								}
							},
							fail: (err) => {
								_this.$message.info('支付押金失败,请到店支付');
							},
						});
					} else {
						_this.$message.info(res.data.info);
					}
				})
			},
			clearCode() {
				this.codeUrl = "";
				this.codeShow = false;
			},
			xinyongRefund() {
				this.depositRefundShow = true;
			},
			// 免押解冻
			depositRefund() {
				this.depositRefundShow = false;
				this.$api.get(global.apiUrls.depositThaw, {
					order_id: this.order_id
				}).then(res => {
					this.$message.info(res.data.info);
					if (res.data.code == 1) {
						this.isShow = true;
						this.getDetails();
					}
				}).catch(err => {

				})
			},
			
			// 查看违章图片  1违章图片  2门店图片
			previewImg(type, index) {
				let _this = this;
				if (type == 1) {
					uni.previewImage({
						current: index,
						urls: _this.violation_img
					})
				} else {
					let arr = [];
					arr.push(_this.detailsInfo.customer_yyzz_image);
					uni.previewImage({
						current: 0,
						urls: arr
					})
				}
				
			},
			customerClose() {
				this.customerStatus = false;
			},
		}
	}
</script>

<style lang="scss" scoped>
	.refund_pop {
		padding: 0 30rpx 30rpx;

		.refund_title {
			font-size: 34rpx;
			text-align: center;
			padding: 28rpx 0;
		}

		.refund_view {
			font-size: 28rpx;
		}

		.refund_money {
			font-weight: 600;
			margin: 16rpx 0 24rpx;
		}

		.refund_type {
			padding: 0 24rpx;
			margin: 24rpx 0;

			.refund_type_item {
				background: #f6f6f6;
				width: 300rpx;
				height: 78rpx;
				border-radius: 12rpx;
			}

			.active_type_item {
				background: #fff;
				color: #1A66FA;
				border: 1px solid #1A66FA;
			}
		}

		.refund_input {
			border: 1px solid #eee;
			margin: 24rpx 0;
			padding: 10rpx 24rpx;
			font-size: 28rpx;
			border-radius: 8rpx;
		}

		.refund_custom {
			margin: 24rpx 0;
			font-size: 26rpx;

			.refund_custom_price {
				color: #FC5B03;
			}
		}

		.refund_tips {
			font-size: 24rpx;
			color: #FC5B03;
			margin-top: 24rpx;
		}

		.refund_btn {
			padding: 32rpx 0 0;
			border-top: 1px solid #eee;
			margin: 24rpx 0;

			.refund_btn_1 {
				background: #f6f6f6;
				width: 300rpx;
				height: 78rpx;
				border-radius: 12rpx;
			}

			.refund_btn_2 {
				color: #fff;
				background: #FC5B03;
				width: 300rpx;
				height: 78rpx;
				border-radius: 12rpx;
				position: relative;
				z-index: 999999;
			}
		}
	}


	.notice_info {
		.title_text {
			font-size: 32rpx;
			font-weight: bold;
			text-align: center;
			padding-top: 32rpx;
		}

		.notice_title {
			padding: 24rpx 0;
		}

		.notice_text {
			height: 300rpx;

			.notice_swiper {
				width: 100%;
				height: 100%;

				.swiper-item {
					width: 100%;
					height: 100%;
					padding: 0 32rpx 24rpx;
					font-size: 28rpx;
				}
			}
		}
	}

	.order_status {
		padding: 40rpx 24rpx;
		width: 100%;
		height: 260rpx;
		background: url(https://speed.zhongchuxing.com/dyimages/226.png) no-repeat;
		background-size: 100% 100%;
		position: relative;

		.order_status_text {
			font-family: PingFang SC, PingFang SC;
			font-weight: 800;
			font-size: 44rpx;
			color: #222222;

			.kefu_text {
				color: FC5B03;
				text-align: center;
				font-size: 24rpx;
				font-weight: 400;
			}

			image {
				width: 38rpx;
				height: 38rpx;
			}
		}

		.order_paytime {
			margin-top: 14rpx;

			.paytime_1 {
				font-weight: 500;
				font-size: 26rpx;
				color: #222222;
			}

			.paytime_2 {
				font-weight: 500;
				font-size: 30rpx;
				color: #EF2E28;
				margin-left: 12rpx;
			}
		}
	}

	.popup_price {
		background: #F6F7FB !important;
		padding-bottom: 32rpx;

		.popup_money {
			display: flex;
			align-items: center;
			justify-content: center;

			.money_1 {
				font-weight: bold;
				font-size: 40rpx;
				color: #000000;
			}

			.money_2 {
				font-weight: bold;
				font-size: 64rpx;
				color: #000000;
			}
		}

		.pay_list {
			background: #fff;
			padding: 8rpx 24rpx;
			border-radius: 16rpx;
			margin: 32rpx 32rpx 42rpx;

			.pay_item {
				padding: 24rpx 0;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.pay_item_le {
					display: flex;
					align-items: center;

					image {
						width: 52rpx;
						height: 52rpx;
						margin-right: 20rpx;
					}

					text {
						font-weight: 500;
						font-size: 30rpx;
						color: #111111;
					}
				}

				.pay_item_ri {
					width: 32rpx;
					height: 32rpx;
				}
			}
		}

		.pay_btn {
			width: 692rpx;
			height: 96rpx;
			background: #FC5B03;
			border-radius: 80rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 500;
			font-size: 30rpx;
			color: #FFFFFF;
			margin: 0 auto;
		}
	}

	.popup_title {
		font-weight: 500;
		font-size: 36rpx;
		color: #000000;
		padding: 32rpx 32rpx 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.popup_calendar {
		padding: 0 8rpx 12rpx;
	}

	.u_tabs {
		height: 78rpx;
		position: sticky;
		top: 0;
		z-index: 10;
		display: flex;
		background-color: #fff;

		.tab_item {
			flex: 1;
			background-color: #fff;

			// line-height: 100px;
			&.active {
				background-color: rgb(55, 185, 169);
			}
		}
	}

	.marginTop1 {
		margin-top: -80rpx;
	}

	.marginTop2 {
		margin-top: -120rpx;
	}

	.car_info {
		background: #fff;
		border-radius: 16rpx;
		margin-left: 24rpx;
		margin-right: 24rpx;
		padding: 20rpx;
		position: relative;
		z-index: 99;
	}

	.vehicle_information {
		position: relative;

		.car_content {
			display: flex;
			align-items: center;
			justify-content: space-between;

			.car_name {
				.car_name_1 {
					font-family: PingFang SC, PingFang SC;
					font-weight: bold;
					font-size: 30rpx;
					color: #111111;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;
				}

				.car_name_2 {
					margin-top: 16px;
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 26rpx;
					color: #111;
					text-overflow: ellipsis;
					overflow: hidden;
					white-space: nowrap;

					.car_name_2_1 {
						color: #CCCCCC;
					}
				}
			}

			.car_img {
				width: 160rpx;
				height: 120rpx;
				position: relative;

				.car_icon {
					width: 80rpx;
					height: 18rpx;
					position: absolute;
					top: 8rpx;
					right: 8rpx;
				}
			}

			/deep/.u-lazy-item {
				width: 160rpx !important;
				height: 120rpx !important;
			}
		}

		.license_plate {
			display: flex;
			align-items: center;
			justify-content: space-between;
			background: #fff;
			padding: 16rpx 0;
			border-radius: 16rpx;
			// position: absolute;
			// width: 100%;
			// bottom: 0;

			.plate_le {
				display: flex;
				align-items: center;
				width: 174rpx;
				height: 30rpx;

				.plate_le_1 {
					width: 28rpx;
					height: 28rpx;
				}

				.plate_le_2 {
					font-weight: 500;
					font-size: 22rpx;
					color: #506898;
				}

				.plate_le_3 {
					font-weight: 500;
					font-size: 22rpx;
					color: #506898;
				}
			}

			.label_le {
				flex: 1;
				display: flex;
				align-items: center;

				.label_1 {
					width: 108rpx;
					height: 30rpx;
				}

				.label_2 {
					padding: 2rpx 6rpx;
					background: rgba(26, 102, 250, 0.05);
					border-radius: 4rpx;
					font-weight: 500;
					font-size: 22rpx;
					color: #506898;
					margin-left: 12rpx;
				}
			}
		}
	}

	.car_date {
		padding: 24rpx 0 0;
		border-top: 2rpx solid #F7F7F7;

		.date_content {
			background: #F7F7F7;
			border-radius: 16rpx;
			padding: 20rpx 54rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.date_item {
				.date_item_1 {
					font-size: 34rpx;
					font-weight: bold;
					color: #111111;
				}

				.date_item_2 {
					display: flex;
					align-items: center;
					justify-content: space-between;
					font-size: 26rpx;
					color: #999;
				}
			}

			.date_days {
				display: flex;
				align-items: center;

				.days_line {
					width: 24rpx;
					height: 2rpx;
					background: #CCCCCC;
					border-radius: 2rpx;
				}

				.days_num {
					padding: 6rpx 34rpx;
					background: #FFFFFF;
					border-radius: 24rpx;
					border: 2rpx solid #CCCCCC;
					font-size: 26rpx;
					color: #111111;
				}
			}
		}

		.quotation_information {
			display: flex;
			justify-content: space-between;
			margin-top: 24rpx;

			.information {
				.information_2 {
					display: flex;
					align-items: center;
					margin-top: 16rpx;

					image {
						width: 18rpx;
						height: 12rpx;
					}

					.information_2_1 {
						font-weight: bold;
						font-size: 26rpx;
						color: #111111;
						margin: 0 12rpx 0 8rpx;
					}

					.information_2_2 {
						width: 434rpx;

						.information_2_2_1 {
							font-weight: bold;
							font-size: 26rpx;
							color: #FC5B03;
						}

						.information_2_2_2 {
							font-weight: 500;
							font-size: 26rpx;
							color: #111111;
							margin-top: 12rpx;
						}
					}
				}
			}

			.quotation_address {
				text-align: center;
				padding-top: 16rpx;

				image {
					width: 32rpx;
					height: 32rpx;
					margin-bottom: 8rpx;
				}

				.address_text {
					font-weight: 400;
					font-size: 20rpx;
					color: #1A66FA;
				}
			}

		}
	}


	.preferential {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.coupon {
			display: flex;
			align-items: center;
			justify-content: space-between;
		}

		.coupon_le {
			font-weight: 400;
			font-size: 26rpx;
			color: #111111;
		}

		.coupon_ri {
			font-size: 26rpx;
			font-weight: bold;
			color: #111111;
		}
	}

	.order_detail {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx 1rpx;
		margin: 24rpx 24rpx 0;

		.order_item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 24rpx;

			.order_item_le {
				font-size: 26rpx;
				color: #111111;
				font-weight: 400;
				overflow: hidden; //超出文本隐藏
				text-overflow: ellipsis; //溢出显示省略号
				display: -webkit-box; //设置为弹性盒子
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1; //只显示两行
			}

			.order_item_ri {
				font-weight: bold;
				font-size: 26rpx;
				color: #111111;

				.order_item_ri_1 {
					font-weight: 500;
					font-size: 26rpx;
					color: #FC5B03;
					margin-right: 16rpx;
				}
			}
		}

		.order_line {
			width: 100%;
			height: 2rpx;
			background: #E7E7E7;
		}

		.order_price {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			margin-top: 20rpx;

			.order_price_1 {
				font-weight: 400;
				font-size: 26rpx;
				color: #111111;
			}

			.order_price_2 {
				font-weight: bold;
				font-size: 30rpx;
				color: #EF2E28;
			}
		}
	}

	.deposit {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.deposit_text {
			display: flex;

			image {
				width: 40rpx;
				height: 40rpx;
			}

			.explain {
				padding-left: 12rpx;
				display: flex;
				align-items: center;

				.explain_text {
					.explain_text_1 {
						font-weight: bold;
						font-size: 26rpx;
						color: #111111;
					}

					.explain_text_2 {
						margin-top: 12rpx;
						font-size: 22rpx;
						color: #666666;
						line-height: 26rpx;
					}
				}
			}

			.label_3 {
				padding: 3rpx 8rpx;
				border: 1px solid rgba(22, 119, 255, 0.9);
				color: rgba(22, 119, 255, 0.9);
				font-size: 24rpx;
				border-radius: 8rpx;

				image {
					width: 22rpx;
					height: 22rpx;
					margin-right: 10rpx;
				}
			}

			.label_4 {
				margin-left: 20rpx;
				font-size: 24rpx;
			}
		}
	}

	.order_change {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.change_item {
			width: 152rpx;
			height: 60rpx;
			border-radius: 8rpx;
			border: 2rpx solid #E7E7E7;
			font-weight: 400;
			font-size: 26rpx;
			color: #111111;
			float: left;
			margin-right: 24rpx;
		}
	}

	.record_info {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.record_item {
			padding: 12rpx 24rpx;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 8rpx;
			}

			font-weight: 500;
			font-size: 26rpx;
			color: #111111;
		}

		.record_line {
			width: 2rpx;
			height: 32rpx;
			background: #E7E7E7;
		}
	}
	.violation_info {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;
		.violation_item {
			margin-top: 24rpx;
			.violation_item_le {
				font-size: 26rpx;
				color: #999;
			}
			.violation_item_ri {
				font-size: 26rpx;
				color: #000000;
			}
			.violation_item_img {
				overflow: hidden;
				.violation_img {
					width: 140rpx;
					height: 140rpx;
					margin: 24rpx 0 16rpx 0;
					image {
						width: 100%;
						height: 100%;
						border-radius: 12rpx;
					}
				}
			}
			.violation_sign {
				color: #FC5B03;
				font-weight: 500;
			}
		}
		.vio_status_text {
			font-weight: 400;
			font-size: 26rpx;
			color: #FC5B03;
		}
	}

	.store_info {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.store_content {
			.store_le {
				image {
					width: 64rpx;
					height: 64rpx;
					border-radius: 50%;
					margin-right: 16rpx;
				}

				.store_le_text {
					font-weight: bold;
					font-size: 26rpx;
					color: #111111;
				}
			}

			.store_ri {
				display: flex;
				align-items: center;

				.ri_item {
					display: flex;
					align-items: center;
					flex-direction: column;
					font-weight: 400;
					font-size: 20rpx;
					color: #CCCCCC;

					image {
						width: 32rpx;
						height: 32rpx;
						margin-bottom: 6rpx;
					}
				}

				.ri_line {
					width: 2rpx;
					height: 32rpx;
					background: #E7E7E7;
					margin: 0 28rpx;
				}
			}
		}
	}

	.notice {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.notice_item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 24rpx;

			.notice_item_le {
				font-weight: 400;
				font-size: 26rpx;
				color: #111111;
			}

			image {
				width: 32rpx;
				height: 32rpx;
			}
		}
	}
	.customer_view {
		margin: 24rpx 24rpx 0;
		.customer_top {
			font-size: 24rpx;
			color: #999999;
			.customer_term {
				color: #2F51FF;
			}
		}
		.customer_botm {
			font-size: 24rpx;
			color: #999999;
			margin-top: 16rpx;
		}
	}

	.money_footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		height: 120rpx;
		position: fixed;
		bottom: calc(0rpx + var(--window-bottom));
		left: 0;
		background: #fff;
		z-index: 10;
		padding: 0 24rpx 0 48rpx;

		.footer_le {
			.footer_le_1 {
				display: flex;
				align-items: center;
				font-weight: 500;
				font-size: 30rpx;
				color: #EF2E28;

				.footer_le_1_1 {
					font-weight: bold;
					font-size: 48rpx;
					color: #EF2E28;
				}
			}

			.footer_le_2 {
				font-weight: 500;
				font-size: 26rpx;
				color: #FC5B03;
			}
		}

		.footer_ri {
			display: flex;
			align-items: center;

			.footer_ri_1 {
				font-weight: 400;
				font-size: 26rpx;
				color: #1A66FA;
			}

			.footer_ri_2 {
				margin-left: 24rpx;
				width: 200rpx;
				height: 74rpx;
				background: #FC5B03;
				border-radius: 80rpx;
				font-weight: bold;
				font-size: 32rpx;
				color: #FFFFFF;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC, PingFang SC;
			}
		}
	}

	.tip_title {
		font-weight: bold;
		font-size: 30rpx;
		color: #111111;
		margin-bottom: 32rpx;

		.tip_title_text {
			font-weight: 400;
			font-size: 22rpx;
		}

		.tip_title_ri {

			.tip_title_ri_1 {
				width: 40rpx;
				height: 39rpx;
			}

			.tip_title_ri_2 {
				font-weight: 400;
				font-size: 26rpx;
				color: #999999;
				margin-left: 4rpx;
			}

			.tip_title_ri_3 {
				width: 32rpx;
				height: 32rpx;
				margin-left: 8rpx;
			}
		}
	}

	.coupon_scroll {
		height: 700rpx;
	}

	.list {
		padding: 4rpx 24rpx 32rpx;

		.list_item {
			width: 100%;
			margin-top: 20rpx;
			background: #fff;
			border-radius: 16rpx;
			display: flex;

			.list_item_le {
				width: 230rpx;
				// height: 200rpx;
				background: rgba(252, 91, 3, 0.05);
				text-align: center;
				// padding-top: 58rpx;
				position: relative;

				.list_item_le_price {
					width: 100%;
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
				}

				.le_price {
					display: flex;
					align-items: center;
					justify-content: center;

					.le_price_1 {
						font-weight: bold;
						font-size: 30rpx;
						color: #FC5B03;
					}

					.le_price_2 {
						font-weight: bold;
						font-size: 52rpx;
						color: #FC5B03;
					}
				}

				.le_tip {
					font-weight: 500;
					font-size: 22rpx;
					color: #FC5B03;
				}

				.le_title {
					position: absolute;
					left: 0;
					top: 0;
					width: 100%;
					height: 52rpx;
					border-radius: 16rpx 0 0 0;
					background: linear-gradient(to right, #FEEDE9, rgba(252, 91, 3, 0.01));
					font-weight: 500;
					font-size: 22rpx;
					color: #FC5B03;
					display: flex;
					align-items: center;
					padding: 0 20rpx;

				}
			}

			.list_item_ri {
				padding: 8rpx 24rpx 0 28rpx;
				flex: 1;

				.ri_content {
					// width: calc(100% - 136rpx);
					width: 100%;

					.ri_content_1 {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 30rpx;
						color: #111111;
					}

					.ri_content_2 {
						font-weight: 400;
						font-size: 22rpx;
						color: #666666;
						margin-top: 8rpx;
					}

					.ri_content_3 {
						font-weight: 400;
						font-size: 26rpx;
						color: #666666;
						margin-top: 28rpx;
					}
				}

				.ri_btn {
					width: 136rpx;
					height: 46rpx;
					border-radius: 40rpx;
					border: 2rpx solid #FC5B03;
					font-weight: 500;
					font-size: 24rpx;
					color: #FC5B03;
					margin: 8rpx 0 0 auto;
				}
			}
		}
	}

	.coupon_info {
		background: #fff;
		border-radius: 16rpx;
		padding: 24rpx 20rpx;
		margin: 24rpx 24rpx 0;

		.coupon_item {
			display: flex;
			align-items: center;
		}

		.coupon_le {
			font-weight: 500;
			font-size: 26rpx;
			color: #111111;
			width: 160rpx;
		}

		.coupon_ri {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: flex-end;

			image {
				width: 32rpx;
				height: 32rpx;
			}

			.coupon_ri_1 {
				width: 140rpx;
				height: 40rpx;
			}
		}
	}

	.wrongQuestion_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.wrongQuestion_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #111;
		line-height: 36rpx;
		width: 135rpx;
	}

	.wrongQuestion_fd0_0_c1 {
		font-size: 32rpx;
		font-weight: bold;
		color: #111;
		line-height: 50rpx;
	}

	.wrongQuestion_fd0_0_c2 {
		width: 135rpx;
		height: 45rpx;
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		text-align: right;
	}

	.wrongQuestion_flex_0 {
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 2000;
		top: 0rpx;
		background: #fff;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background-size: 100% auto !important;
		background-color: #F6F7FB;
	}


	.myInfo_picker4_0_c2 {
		color: #FC5B03;
		line-height: 40rpx;
		font-size: 32rpx;
		font-weight: 400;
	}

	.myInfo_picker4_0_c1 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.myInfo_picker4_0_c0 {
		line-height: 40rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #BFBFBF;
	}

	.myInfo_picker4_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		background-size: 100% !important;
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}



	.free_code {
		width: 530rpx;
		border-radius: 28rpx;

		.free_title_img {
			width: 116rpx;
			height: 116rpx;
			margin: -40rpx auto 8rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.free_store {
			text-align: center;
			font-weight: bold;
			font-size: 32rpx;
			color: #222222;
		}

		.input_content {
			width: 534rpx;
			height: 96rpx;
			background: #F6F7FB;
			border-radius: 16rpx;
			margin: 32rpx auto;
			padding: 0 32rpx;

			.input_1 {
				font-weight: bold;
				font-size: 36rpx;
				color: #222222;
			}

			.input_2 {
				flex: 1;
				margin: 0 24rpx;
				font-size: 32rpx;
			}

			.input_3 {
				width: 32rpx;
				height: 32rpx;
			}
		}

		.code_view {
			text-align: center;

			.qrcode_img {
				margin: 0 auto;
				width: 352rpx;
				height: 352rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.qrcode_text {
				margin-top: 32rpx;
				font-weight: 600;
				font-size: 30rpx;
				color: #666666;
			}
		}

		.code_btn {
			width: 120rpx;
			height: 50rpx;
			border-radius: 8rpx;
			margin: 32rpx auto 0;
			background: #1A66FA;
			color: #fff;
			font-size: 24rpx;

		}

		.operation_btn {
			margin: 38rpx 0 0;
			padding: 0 40rpx;

			.operation_1 {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 172rpx;
				height: 64rpx;
				background: #FFFFFF;
				border-radius: 16rpx;
				border: 2rpx solid #EEEEEE;
				font-weight: 400;
				font-size: 28rpx;
				color: #222222;
			}

			.operation_2 {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 172rpx;
				height: 64rpx;
				background: #1A66FA;
				border-radius: 16rpx;
				border: 2rpx solid #1A66FA;
				font-weight: 400;
				font-size: 28rpx;
				color: #fff;
			}
		}
	}

	.change_text {
		background: #1A66FA;
		font-size: 28rpx;
		color: #fff;
		width: 120rpx;
		height: 60rpx;
	}

	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}

	.rect {
		width: 530rpx;
		background-color: #fff;
		border-radius: 28rpx;
		padding: 48rpx 0 32rpx;
	}
</style>